# class Person(object):
#     def __init__(self):
#         self.password_hash = ""
#
#     #     get 方法(获取属性值)
#     @property
#     def password(self):
#         print("get方法被猝发")
#
#     # set (给属性设置值)
#     @password.setter
#     def password(self, value):
#         # 加密处理
#         print("set方法被触发 %s" % value)
#
# if __name__ == '__main__':
#     p = Person()
#     p.password = "110"
#     print(p.password)

import functools

def user_login_data(view_func):

    @functools.wraps(view_func)
    def wrapper(*args, **kwargs):
        result = view_func(*args, **kwargs)
        return result
    return wrapper

@user_login_data
def index():
    print("index")

@user_login_data
def hello():
    print("hello")

if __name__ == '__main__':
    print(index.__name__)
    print(hello.__name__)